﻿using ContactCenter.Core.Interfaces;
using ContactCenter.Core.ObjectModel;
using StructureMap;

namespace ContactCenter.Persistence.NH
{
    public class RepositoryRegistrationJob : IBootstrapperJob
    {
        private readonly IContainer _container;
        
        public RepositoryRegistrationJob(IContainer container)
        {
            _container = container;
        }

        #region IBootstrapperJob Members

        public void Execute()
        {
            _container.Configure(x => x.For<ICustomerRepository>().Use<CustomerRepository>());
        }

        #endregion

        #region IOrderable Members

        public int Position
        {
            get { return int.MaxValue; }
        }

        #endregion
    }
}
